/*
 * @FilePath: \flutter_ducafecat_news_getx\lib\pages\main\widgets\music.dart
 * @Date: 2022-07-19 14:31:37
 * @LastEditTime: 2022-07-22 11:02:44
 * @Description: 
 */

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import '../index.dart';

class Music extends GetView<MainController> {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 100.h,
      width: 375.w,
      child: Column(
        children: [
          TextButton(
            child: Text('播放音乐'),
            onPressed: () {
              controller.play();
              controller.goToMusicPlay();
            },
          ),
          TextButton(
            child: Text('暂停'),
            onPressed: () {
              controller.pause();
            },
          )
        ],
      ),
    );
  }
}
